package com.gp.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;

import java.io.Serializable;


/**
 * <p>
 * 
 * </p>
 *
 * @author 弓成龙
 * @since 2017-11-26
 */
@TableName("base_login_logs")
public class BaseLoginLogs extends Model<BaseLoginLogs> {

  private static final long serialVersionUID = 1L;

  private Long id;
  private Long userId;
  private String username;
  private String ip;
  private String useragent;
  /**
   * 自定义填充的创建时间
   */
  @TableField(fill = FieldFill.INSERT) // 该注解插入忽略验证，自动填充
  private Date createTime;

  public BaseLoginLogs(Long userId, String username, String ip, String useragent) {
    this.userId = userId;
    this.username = username;
    this.ip = ip;
    this.useragent = useragent;
  }

  public BaseLoginLogs() {}

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Long getUserId() {
    return userId;
  }

  public void setUserId(Long userId) {
    this.userId = userId;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getIp() {
    return ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }

  public String getUseragent() {
    return useragent;
  }

  public void setUseragent(String useragent) {
    this.useragent = useragent;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  public static long getSerialversionuid() {
    return serialVersionUID;
  }

  @Override
  protected Serializable pkVal() {
    return this.id;
  }
}
